home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_shs_etdoor.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
3KB
|
123 lines
# Jones 3D Cog Script
#
# SHS_ETdoor.cog Make the door to the courtyard open/close.
#
# [JWC, SXC]
#
# (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ========================================================================================
symbols
message activated
message startup
sector doorsector
sound doormove=shs_door_double.wav local
thing door0
thing door1
thing button
thing player local
thing interpcam
int filter=0 local # prevent multiple activates
int position=0 local # door open or closed
cog noworktalkcog
end
# ========================================================================================
code
startup:
player= GetLocalPlayerThing();
# Doors start open
Rotate(door0, -90, 1, .1);
Rotate(door1, 90, 1, .1);
return;
activated:
if (GetCurItem(player) != 0) return; # prevents activating with chalk
if ((GetSenderRef() == button) && (filter == 0))
{
Print("activated");
filter=1;
StartCutscene(0);
SetActorFlags(player, 0x200000);
StopThing(player);
DeselectWeapon(player);
DeselectWeaponWait(player);
SetExtCamOffsetToThing(interpCam);
# allow camera to set
Sleep(0.5);
# play indy anim
PlayMode(player, 60, 0);
# pause to synch with button
Sleep(0.2);
MoveToFrame(button, 1, 2);
WaitForStop(button);
if (global3 == 1)
{
if (position == 1)
{
# Open doors
SetSectorAdjoins(doorsector, 1);
Rotate(door0, -90, 1, 3.0);
Rotate(door1, 90, 1, 3.0);
PlaySoundThing(doormove, door0, 1.0, 4, 8, 0);
WaitForStop(door0);
position=0;
}
else
{
# Close doors
rotate(door0, 90, 1, 3.0);
rotate(door1, -90, 1, 3.0);
PlaySoundThing(doormove, door0, 1.0, 4, 8, 0);
WaitForStop(door0);
# turn sector off
SetSectorAdjoins(doorsector, 0);
position=1;
}
}
else
{
SendMessageEx(NoWorkTalkCog, user1, 0, 0, 0, 0);
global15 = 0; # per Randy
while (global15 == 0)
{
Sleep(0.01); # wait for line to finish
}
}
# Give control back to player
RestoreExtCam();
ClearActorFlags(player, 0x200000);
EndCutscene();
MoveToFrame(button, 0, 2);
WaitForStop(button);
filter=0;
}
return;
end